<?php
/**
 * menu.php
 * @author ranuandra
 *
 * 9 Agu 2011 12:33:47
 *
 * 
 */
class Model_Menu extends ORM
{
	
	private $_form = array('menu_name' 		=> '',
							'controller' 	=> '',
							);
							
	private $_field = array(
						'menu_name', 'controller',
					);

	public function rules()
	{
		return array(
			'menu_name' 	   => array(
			 						array('min_length', array(':value', 0)),
			 ),
			'controller' 	   => array(
			 						array('min_length', array(':value', 0)),
			 ),

		);
	}
	
	public function get_form()
	{
		return $this->_form;
	}
	
	public function get_field()
	{
		return $this->_field;
	}
	
	public function create_menu($values)
	{
		return $this->values($values, $this->_field)->create();
	}
}